import {Component} from 'react';
import './header.css'
class Header extends Component {
    constructor(props) {
        super()
        // console.log(list)
    }
    tranFun (val) {
        // console.log(val)
        this.props.func(val)
        // console.log(this)
    }
    changeMsg =() => {
    }
    render(h) {
        return (
            <div>
                <ul>
                    {this.props.list.map((item, index, array) => {
                        return <li key={index} onClick={this.tranFun.bind(this, item)}>{item}</li>
                    })}
                </ul>
            </div>
            
        )
    }
}

export default Header
